\(\int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx\) [59]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 50 \[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=-\frac {\log \left (1-\sqrt {2} x+2 x^2\right )}{2 \sqrt {2}}+\frac {\log \left (1+\sqrt {2} x+2 x^2\right )}{2 \sqrt {2}} \]

[Out]

-1/4*ln(1+2*x^2-x*2^(1/2))*2^(1/2)+1/4*ln(1+2*x^2+x*2^(1/2))*2^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {1178, 642} \[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=\frac {\log \left (2 x^2+\sqrt {2} x+1\right )}{2 \sqrt {2}}-\frac {\log \left (2 x^2-\sqrt {2} x+1\right )}{2 \sqrt {2}} \]

[In]

Int[(1 - 2*x^2)/(1 + 2*x^2 + 4*x^4),x]

[Out]

-1/2*Log[1 - Sqrt[2]*x + 2*x^2]/Sqrt[2] + Log[1 + Sqrt[2]*x + 2*x^2]/(2*Sqrt[2])

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1178

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[-2*(d/e) - b/c, 2]},
 Dist[e/(2*c*q), Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x
 - x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] &&  !GtQ[b^2
- 4*a*c, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\int \frac {\frac {1}{\sqrt {2}}+2 x}{-\frac {1}{2}-\frac {x}{\sqrt {2}}-x^2} \, dx}{2 \sqrt {2}}-\frac {\int \frac {\frac {1}{\sqrt {2}}-2 x}{-\frac {1}{2}+\frac {x}{\sqrt {2}}-x^2} \, dx}{2 \sqrt {2}} \\ & = -\frac {\log \left (1-\sqrt {2} x+2 x^2\right )}{2 \sqrt {2}}+\frac {\log \left (1+\sqrt {2} x+2 x^2\right )}{2 \sqrt {2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.84 \[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=\frac {-\log \left (-1+\sqrt {2} x-2 x^2\right )+\log \left (1+\sqrt {2} x+2 x^2\right )}{2 \sqrt {2}} \]

[In]

Integrate[(1 - 2*x^2)/(1 + 2*x^2 + 4*x^4),x]

[Out]

(-Log[-1 + Sqrt[2]*x - 2*x^2] + Log[1 + Sqrt[2]*x + 2*x^2])/(2*Sqrt[2])

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.78

method result size
default \(-\frac {\ln \left (1+2 x^{2}-x \sqrt {2}\right ) \sqrt {2}}{4}+\frac {\ln \left (1+2 x^{2}+x \sqrt {2}\right ) \sqrt {2}}{4}\) \(39\)
risch \(-\frac {\ln \left (1+2 x^{2}-x \sqrt {2}\right ) \sqrt {2}}{4}+\frac {\ln \left (1+2 x^{2}+x \sqrt {2}\right ) \sqrt {2}}{4}\) \(39\)

[In]

int((-2*x^2+1)/(4*x^4+2*x^2+1),x,method=_RETURNVERBOSE)

[Out]

-1/4*ln(1+2*x^2-x*2^(1/2))*2^(1/2)+1/4*ln(1+2*x^2+x*2^(1/2))*2^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.90 \[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=\frac {1}{4} \, \sqrt {2} \log \left (\frac {4 \, x^{4} + 6 \, x^{2} + 2 \, \sqrt {2} {\left (2 \, x^{3} + x\right )} + 1}{4 \, x^{4} + 2 \, x^{2} + 1}\right ) \]

[In]

integrate((-2*x^2+1)/(4*x^4+2*x^2+1),x, algorithm="fricas")

[Out]

1/4*sqrt(2)*log((4*x^4 + 6*x^2 + 2*sqrt(2)*(2*x^3 + x) + 1)/(4*x^4 + 2*x^2 + 1))

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.92 \[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=- \frac {\sqrt {2} \log {\left (x^{2} - \frac {\sqrt {2} x}{2} + \frac {1}{2} \right )}}{4} + \frac {\sqrt {2} \log {\left (x^{2} + \frac {\sqrt {2} x}{2} + \frac {1}{2} \right )}}{4} \]

[In]

integrate((-2*x**2+1)/(4*x**4+2*x**2+1),x)

[Out]

-sqrt(2)*log(x**2 - sqrt(2)*x/2 + 1/2)/4 + sqrt(2)*log(x**2 + sqrt(2)*x/2 + 1/2)/4

Maxima [F]

\[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=\int { -\frac {2 \, x^{2} - 1}{4 \, x^{4} + 2 \, x^{2} + 1} \,d x } \]

[In]

integrate((-2*x^2+1)/(4*x^4+2*x^2+1),x, algorithm="maxima")

[Out]

-integrate((2*x^2 - 1)/(4*x^4 + 2*x^2 + 1), x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.68 \[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=\frac {1}{4} \, \sqrt {2} \log \left (x^{2} + \left (\frac {1}{4}\right )^{\frac {1}{4}} x + \frac {1}{2}\right ) - \frac {1}{4} \, \sqrt {2} \log \left (x^{2} - \left (\frac {1}{4}\right )^{\frac {1}{4}} x + \frac {1}{2}\right ) \]

[In]

integrate((-2*x^2+1)/(4*x^4+2*x^2+1),x, algorithm="giac")

[Out]

1/4*sqrt(2)*log(x^2 + (1/4)^(1/4)*x + 1/2) - 1/4*sqrt(2)*log(x^2 - (1/4)^(1/4)*x + 1/2)

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.40 \[ \int \frac {1-2 x^2}{1+2 x^2+4 x^4} \, dx=\frac {\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,x}{2\,x^2+1}\right )}{2} \]

[In]

int(-(2*x^2 - 1)/(2*x^2 + 4*x^4 + 1),x)

[Out]

(2^(1/2)*atanh((2^(1/2)*x)/(2*x^2 + 1)))/2